package model;

import java.util.Vector;

import session_beans.AirTransportSessionBean;
import session_beans.AirTransportSessionRemote;
import entity_beans.City;
import entity_beans.Flight;
import entity_beans.Passenger;

/**
 * Pomocni bean.
 * 
 * Svrha:
 * U JSP stranici, ne moze se instancirati interfejs u:
 * <jsp:useBean id="webShopSession" class="session_Beans.WebShopSessionRemote" scope="application"></jsp:useBean>
 * 
 * Umesto ovoga mora se koristiti pomocni bean:
 * <jsp:useBean id="auxBean" class="model.AuxBean" scope="application"></jsp:useBean>
 * 
 * 
 * @author Uros Krkic
 */
public class AuxBean {

	private AirTransportSessionRemote airTransportSession;
	
	public AuxBean() {
		
		airTransportSession = new AirTransportSessionBean();
	}
	

	
	public Vector<Flight> getFlights() {
		return airTransportSession.getFlights();
	}
	
	
	public Vector<City> getCities() {
		return airTransportSession.getCities();
	}
	
	
	public Flight getFlightByID(String flightID) {
		return airTransportSession.getFlightByID(flightID);
	}
	
	
	public Vector<Passenger> getPassengersByFlight(String flightID) {
		return airTransportSession.getPassengersByFlight(flightID);
	}
	
	public Vector<Flight> getFlightsByPassenger(Long jmbg) {
		return airTransportSession.getFlightsByPassenger(jmbg);
	}
	
	
	public Passenger getPassengerByJMBG(String jmbg) {
		return airTransportSession.getPassengerByJMBG(jmbg);
	}
	
}
